//
//  TableFooterView.m
//  BCW
//
//  Created by Mac on 16/3/29.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "TableFooterView.h"

@implementation TableFooterView{
    UILabel *_textL;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    [self setupSubview];
}

- (void)setupSubview{
    
    if (_textL) {
        return;
    }
    self.backgroundColor = ARGBColor(249, 249, 249, 1);
    CGFloat unitW = (BCWScreenW - 3) / 4;
    UILabel *titleL = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, unitW, self.height)];
    titleL.text = @"龙虎";
    titleL.textAlignment = 1;
    titleL.backgroundColor = [UIColor groupTableViewBackgroundColor];
    [self addSubview:titleL];
    
    UILabel *textL = [[UILabel alloc] initWithFrame:CGRectMake(unitW + 1, 0, unitW * 3 + 2, self.height)];
    textL.text = @"龙";
    textL.backgroundColor = [UIColor groupTableViewBackgroundColor];
    [self addSubview:textL];
    _textL = textL;
}

- (instancetype)init{
    return nil;
}

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self setupSubview];
    }
    return self;
}

- (void)setText:(NSString *)text{
    _textL.text = text;
}
@end
